package com.e3.basdoc.bank.client;

import java.util.List;

import com.e3.basdoc.bank.model.BankModel;
import com.e3.basdoc.bank.model.BankQC;
import com.e3.web.core.client.RPCServiceHelper;
import com.e3.web.core.client.WebException;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;

public interface BankRPCService extends RemoteService {
	public static class Util {

		private static BankRPCServiceAsync instance;

		public static BankRPCServiceAsync getInstance() {
			instance = (BankRPCServiceAsync) RPCServiceHelper.getService(BankRPCService.class.getName());
			if (instance == null) {
				instance = GWT.create(BankRPCService.class);
				RPCServiceHelper.registerServiceEntryPoint(instance);
			}
			return instance;
		}

	}

	public BankModel newBank(BankModel bankModel) throws WebException;
	
	public BankModel modifyBank(BankModel bankModel) throws WebException;
	
	public List<BankModel> getBankByCondition(BankQC bankQC) throws WebException;
	
	public void deleteBanks(List<BankModel> banks) throws WebException;
	
	public List<BankModel> getBankChildren(BankModel bank) throws WebException;
}
